package com.ssh.controller;

import com.ssh.util.HttpHelper;
import com.ssh.util.SqlHelper;
import net.sf.json.JSONObject;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;

/**
 * Created by XL on 2018/6/11.
 */
@Controller// 指明当前类是控制器
@RequestMapping("/swszProductbase")    // 根路径
public class SwszProductbaseController {

    @Autowired
    private SqlHelper sqlHelper;


    /**
     * 【    】
     * @param request
     * @param response
     * @throws Exception
     */
    @RequestMapping("/register.do")
    public void register(HttpServletRequest request, HttpServletResponse response) throws Exception{
        response.setCharacterEncoding("utf-8");
        response.setContentType("text/html; charset=utf-8");
        PrintWriter writer=response.getWriter();
        JSONObject resObject = new JSONObject();
        JSONObject json = HttpHelper.getBodyJSON(request, "utf-8");





        writer.write(resObject.toString());
    }


}
